package com.ctsi.ssdc.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.ctsi.ssdc.annotation.AutoId;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.time.ZonedDateTime;

/**
 * @author ctsi-biyi-generator
*/
@ApiModel(description = "LitemallCategory")
@TableName("litemall_category")
public class LitemallCategory extends Model<LitemallCategory> implements Serializable {
    /**
     * @Fields id 
     */
    @ApiModelProperty("")
    @AutoId(primaryKey = "id")
    @JsonSerialize(using = ToStringSerializer.class)
    @TableId(value="id")
    @TableField(value="id")
    private Integer id;

    /**
     * @Fields name 类目名称
     */
    @ApiModelProperty("name")
    @TableField(value="name")
    private String name;

    /**
     * @Fields keywords 类目关键字，以JSON数组格式
     */
    @ApiModelProperty("keywords")
    @TableField(value="keywords")
    private String keywords;

    /**
     * @Fields desc 类目广告语介绍
     */
    @ApiModelProperty("desc")
    @TableField(value="desc")
    private String desc;

    /**
     * @Fields pid 父类目ID
     */
    @ApiModelProperty("pid")
    @TableField(value="pid")
    private Integer pid;

    /**
     * @Fields iconUrl 类目图标
     */
    @ApiModelProperty("iconUrl")
    @TableField(value="icon_url")
    private String iconUrl;

    /**
     * @Fields picUrl 类目图片
     */
    @ApiModelProperty("picUrl")
    @TableField(value="pic_url")
    private String picUrl;

    /**
     * @Fields level 
     */
    @ApiModelProperty("")
    @TableField(value="level")
    private String level;

    /**
     * @Fields sortOrder 排序
     */
    @ApiModelProperty("sortOrder")
    @TableField(value="sort_order")
    private Byte sortOrder;

    /**
     * @Fields addTime 创建时间
     */
    @ApiModelProperty("addTime")
    @TableField(value="add_time")
    private ZonedDateTime addTime;

    /**
     * @Fields updateTime 更新时间
     */
    @ApiModelProperty("updateTime")
    @TableField(value="update_time")
    private ZonedDateTime updateTime;

    /**
     * @Fields deleted 逻辑删除
     */
    @ApiModelProperty("deleted")
    @TableField(value="deleted")
    private Boolean deleted;

    private static final long serialVersionUID = 1L;

    /** 
     * @return id 
     */
    public Integer getId() {
        return id;
    }

    /**
     * @param id 
     */
    public void setId(Integer id) {
        this.id = id;
    }

    /** 
     * @return name 类目名称
     */
    public String getName() {
        return name;
    }

    /**
     * @param name 类目名称
     */
    public void setName(String name) {
        this.name = name == null ? null : name.trim();
    }

    /** 
     * @return keywords 类目关键字，以JSON数组格式
     */
    public String getKeywords() {
        return keywords;
    }

    /**
     * @param keywords 类目关键字，以JSON数组格式
     */
    public void setKeywords(String keywords) {
        this.keywords = keywords == null ? null : keywords.trim();
    }

    /** 
     * @return desc 类目广告语介绍
     */
    public String getDesc() {
        return desc;
    }

    /**
     * @param desc 类目广告语介绍
     */
    public void setDesc(String desc) {
        this.desc = desc == null ? null : desc.trim();
    }

    /** 
     * @return pid 父类目ID
     */
    public Integer getPid() {
        return pid;
    }

    /**
     * @param pid 父类目ID
     */
    public void setPid(Integer pid) {
        this.pid = pid;
    }

    /** 
     * @return icon_url 类目图标
     */
    public String getIconUrl() {
        return iconUrl;
    }

    /**
     * @param iconUrl 类目图标
     */
    public void setIconUrl(String iconUrl) {
        this.iconUrl = iconUrl == null ? null : iconUrl.trim();
    }

    /** 
     * @return pic_url 类目图片
     */
    public String getPicUrl() {
        return picUrl;
    }

    /**
     * @param picUrl 类目图片
     */
    public void setPicUrl(String picUrl) {
        this.picUrl = picUrl == null ? null : picUrl.trim();
    }

    /** 
     * @return level 
     */
    public String getLevel() {
        return level;
    }

    /**
     * @param level 
     */
    public void setLevel(String level) {
        this.level = level == null ? null : level.trim();
    }

    /** 
     * @return sort_order 排序
     */
    public Byte getSortOrder() {
        return sortOrder;
    }

    /**
     * @param sortOrder 排序
     */
    public void setSortOrder(Byte sortOrder) {
        this.sortOrder = sortOrder;
    }

    /** 
     * @return add_time 创建时间
     */
    public ZonedDateTime getAddTime() {
        return addTime;
    }

    /**
     * @param addTime 创建时间
     */
    public void setAddTime(ZonedDateTime addTime) {
        this.addTime = addTime;
    }

    /** 
     * @return update_time 更新时间
     */
    public ZonedDateTime getUpdateTime() {
        return updateTime;
    }

    /**
     * @param updateTime 更新时间
     */
    public void setUpdateTime(ZonedDateTime updateTime) {
        this.updateTime = updateTime;
    }

    /** 
     * @return deleted 逻辑删除
     */
    public Boolean getDeleted() {
        return deleted;
    }

    /**
     * @param deleted 逻辑删除
     */
    public void setDeleted(Boolean deleted) {
        this.deleted = deleted;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        LitemallCategory other = (LitemallCategory) that;
        return (this.getId() == null ? other.getId() == null :
				 this.getId().equals(other.getId()))
            && (this.getName() == null ? other.getName() == null :
				 this.getName().equals(other.getName()))
            && (this.getKeywords() == null ? other.getKeywords() == null :
				 this.getKeywords().equals(other.getKeywords()))
            && (this.getDesc() == null ? other.getDesc() == null :
				 this.getDesc().equals(other.getDesc()))
            && (this.getPid() == null ? other.getPid() == null :
				 this.getPid().equals(other.getPid()))
            && (this.getIconUrl() == null ? other.getIconUrl() == null :
				 this.getIconUrl().equals(other.getIconUrl()))
            && (this.getPicUrl() == null ? other.getPicUrl() == null :
				 this.getPicUrl().equals(other.getPicUrl()))
            && (this.getLevel() == null ? other.getLevel() == null :
				 this.getLevel().equals(other.getLevel()))
            && (this.getSortOrder() == null ? other.getSortOrder() == null :
				 this.getSortOrder().equals(other.getSortOrder()))
            && (this.getAddTime() == null ? other.getAddTime() == null :
				 this.getAddTime().equals(other.getAddTime()))
            && (this.getUpdateTime() == null ? other.getUpdateTime() == null :
				 this.getUpdateTime().equals(other.getUpdateTime()))
            && (this.getDeleted() == null ? other.getDeleted() == null :
				 this.getDeleted().equals(other.getDeleted()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
        result = prime * result + ((getKeywords() == null) ? 0 : getKeywords().hashCode());
        result = prime * result + ((getDesc() == null) ? 0 : getDesc().hashCode());
        result = prime * result + ((getPid() == null) ? 0 : getPid().hashCode());
        result = prime * result + ((getIconUrl() == null) ? 0 : getIconUrl().hashCode());
        result = prime * result + ((getPicUrl() == null) ? 0 : getPicUrl().hashCode());
        result = prime * result + ((getLevel() == null) ? 0 : getLevel().hashCode());
        result = prime * result + ((getSortOrder() == null) ? 0 : getSortOrder().hashCode());
        result = prime * result + ((getAddTime() == null) ? 0 : getAddTime().hashCode());
        result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
        result = prime * result + ((getDeleted() == null) ? 0 : getDeleted().hashCode());
        return result;
    }
}